﻿<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>通讯日志</title>
	<meta name="decorator" content="default"/>
	<tags:import includes="spinner,bootbox,form,datepicker,datepickerCss"></tags:import>
	<script src="${ctxStatic}/modules/log/commLog.js"></script>
	<script type="text/javascript">
		var _ctx = '${ctx}';
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#frmSearch").submit();
			return false;
		}
	</script>
</head>
<body>
	<br>
	<form id="frmSearch" modelAttribute="log/commLog" action="${ctx}/log/commLog/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>		
		<!--添加查询条件-->
		
		<table>
			<tr>
				<td><label>IP ：</label></td>
				<td>
					<widgets:select 
						datasource="${virtualNeList}" 
					    width="130"
					    uname="update"
					    value="${ip }"
					    all="true"
					 	dictName="ip" dataPlaceholder="字典类型">
					</widgets:select>
				<td><label>源 ：</label></td>
				<td><input disabled="disabled" type="text" name="src" htmlEscape=" " maxlength="20" class="input-medium" value="${src }"/></td>
				<td><label>通信类型 ：</label></td>
				<td>
					<widgets:select 
						datasource="${fns:getDictList('snmp_action')}" 
					    width="130"
					    uname="update"
					    value="${type }"
					    all="true"
					 	dictName="type" dataPlaceholder="字典类型">
					</widgets:select>
				</td>
				<td><button id="btnQuery" class="btn btn-success" type="submit" onclick="this.form.submit();">查询</button></td>
			</tr>
			<tr>
				<td><label>描述 ：</label></td>
				<td><input type="text" name="desci" htmlEscape="false" maxlength="200" class="input-medium" value="${desci }"/></td>
				<td><label>参数 ：</label></td>
				<td><input type="text" name="params" htmlEscape="false" maxlength="200" class="input-medium" value="${params }"/></td>
				<td><label>时间：</label></td>
				<td>
					<input type="text" name="time0"  id="time0"  htmlEscape="false" maxlength="20" class="input-medium"  value="${time0 }"/>-
					<input type="text" name="time1"  id="time1"  htmlEscape="false" maxlength="20" class="input-medium"  value="${time1 }"/>
				</td>
				<td></td>
			</tr>
		</table>
	</form>
	<br><br>
	<table id="contentTable" class="table table-striped table-bordered table-condensed" style="table-layout:fixed;">		
		<thead><tr>
		<th class="center" style="width: 50px;"><label> <input
						type="checkbox" class="ace" /> <span class="lbl"></span>
				</label>
		</th>
        <th>IP</th>
       <!--  <th>源</th> -->
        <th>通信类型</th>
        <th>描述</th>
        
        <th>时间</th>
		<shiro:hasPermission name="modules/log:commLog:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${pages.list}" var="commLog">
		<tr>
		<td class="center">
			<label>
				<input value="${commLog.id}" type="checkbox" class="ace" /> 
				<span class="lbl"></span>
			</label>
		</td>
                 <td style="word-break: break-all; word-wrap:break-word;">${commLog.ip}</td>
                 <%-- <td style="word-break: break-all; word-wrap:break-word;">${commLog.src}</td> --%>
                 <td style="word-break: break-all; word-wrap:break-word;">${fns:getDictLabel(commLog.type,'snmp_action','N/A')}</td>
                 <td style="word-break: break-all; word-wrap:break-word;">${fns:getCommLogDesc(commLog.desci)}</td>
                 
                 <td style="word-break: break-all; word-wrap:break-word;">${fns:calendar2String(commLog.timei)}</td>

			</tr>
		</c:forEach>
		</tbody>
	</table>
	${pages}
	<!-- 模态窗体 -->
	<div id="modalTable" action="new" class="modal fade" style="display:none" tabindex="-1">
		<div class="modal-dialog">
			<div class="modal-content" style="width: 400px; height: 100%;">
				<div class="modal-header no-padding">
					<div class="table-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">
							<span class="white">&times;</span>
						</button>
						<span id='modalTitle'>新增窗体</span>
					</div>
				</div>
				<br>
				<!-- 新增窗体内部 -->
				<form id="frmSubmit" class="form-horizontal" role="form"
					method="post">					
					<input type="hidden" name="userId" value="${userId}" uname="update"/> 
					<input type="hidden" name="id" uname="update"/>
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">主键 : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="id" uname="update"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">IP : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="ip" uname="update"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">源 : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="src" uname="update"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">通信类型 : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="type" uname="update"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">描述 : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="desci" uname="update"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">参数 : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="params" uname="update"/>
							</div>
						</div>						
				        <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">访问日期 : </label>
							<div class="col-sm-9">
								<input type="text" class="col-xs-10"
									name="timei" uname="update"/>
							</div>
						</div>						

					<div class="space-4"></div>
					<div class="clearfix form-actions">
						<div class="center">
							<button id="btnSubmit" class="btn btn-info" type="button">
								<i class="icon-ok bigger-110"></i> 保存
							</button>
							&nbsp; &nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="icon-undo bigger-110"></i> 重置
							</button>
						</div>
					</div>
				</form>
				<!-- PAGE CONTENT ENDS -->
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
</body>
</html>
